﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Com.CMS263.PO;
using Com.CMS263.BLL;
using Com.CMS263.Web;

namespace Com.CMS263.Web.manage.ManageArtType
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    //[WebService(Namespace = "http://tempuri.org/")]
    //[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class DelExtAttribute : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            int attrid = Convert.ToInt32(context.Request["id"]);
            ExtAttributeBLL extbll = new ExtAttributeBLL();
            ExtValueBLL evbll = new ExtValueBLL();
            int count = evbll.GetCounByAttrId(attrid);
            if (count > 0)
            {
                context.Response.Write("you");
            }
            else
            {
               bool b= extbll.Delete("ExtAttribute", attrid);
               if (b)
               {
                   context.Response.Write("ok");
               }
               else
               {
                   context.Response.Write("error");
               }
            }
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
